<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .bar {
            margin: 20px auto;
            padding: 0.3px;
            height: 20px;
            width: 200px;
            border: 1px solid red;
            border-radius: 10px;
        }

        .bar_in {
            height: 100%;
            width: 100px;
            border-radius: 10px;
            background-color: red;
            transition: all 1s;
        }

        .bar_in:hover {
            width: 200px;
            background-color: greenyellow;
        }
    </style>1
</head>

<body>
    <div class="bar">
        <div class="bar_in"></div>
    </div>

</body>

</html>